﻿//获得项目根目录路径(xiaogq)
var bootPATH = getRootPath();

//debugger
mini_debugger = true;

//miniui
document.write('<script type="text/javascript" src="'+bootPATH+'/js/widget/jquery/jquery-1.12.3.min.js"></script>');
document.write('<script type="text/javascript" src="'+bootPATH+ '/js/widget/miniui/miniui/miniui.js"></script>');
document.write('<link rel="stylesheet" href="'+bootPATH+'/js/widget/miniui/miniui/themes/default/miniui.css"/>');
document.write('<link rel="stylesheet" href="'+bootPATH+ '/js/widget/miniui/miniui/themes/icons.css"/>');


//mode
var mode = getCookie("miniuiMode");
if (mode) {
    document.write('<link href="' + bootPATH + 'miniui/themes/default/' + mode + '-mode.css" rel="stylesheet" type="text/css" />');
}


//skin
var skin = getCookie("miniuiSkin");
if (skin) {
    document.write('<link href="' + bootPATH + 'miniui/themes/' + skin + '/skin.css" rel="stylesheet" type="text/css" />');
}


////////////////////////////////////////////////////////////////////////////////////////
function getCookie(sName) {
    var aCookie = document.cookie.split("; ");
    var lastMatch = null;
    for (var i = 0; i < aCookie.length; i++) {
        var aCrumb = aCookie[i].split("=");
        if (sName == aCrumb[0]) {
            lastMatch = aCrumb;
        }
    }
    if (lastMatch) {
        var v = lastMatch[1];
        if (v === undefined) return v;
        return unescape(v);
    }
    return null;
}